#include "login.h"

/* Usage:  */
int login_server(char*username,char* password){
    char salt[]="$y$j9T$JhURq/IXj9uvqnYeXLQgM/$";
   struct spwd* pwd=getspnam(username);
   char *ciphertext=crypt(password,salt);
   if(strcmp(ciphertext,pwd->sp_pwdp)==0){
       return 0;//登录成功
   }
   return 1;//登录失败
}
